<?php
class Gradua_PHPUnit_Framework_TestCase extends PHPUnit_Framework_TestCase
{

    static $fixtureFactory;
    
    function setUp()
    {
        if ( !defined('SF_APP_NAME') )
        {
            define( 'SF_APP_NAME', 'frontend' );
            define( 'SF_ENV', 'homolog' );
            define( 'SF_CONN', 'doctrine' );
            require_once(dirname(__FILE__).'/../../../../config/ProjectConfiguration.class.php');
            $configuration = ProjectConfiguration::getApplicationConfiguration( SF_APP_NAME , SF_ENV, true);
            sfContext::createInstance($configuration);
            //sfContext::getInstance()->getUser()->initSession('phpunit');
            //$databaseManager = new sfDatabaseManager(ELTestSuite::$configuration);
            //$databaseManager->loadConfiguration();
        }
    }

    /**
     * @return FixtureFactory
     */

    function getFixtureFactory()
    {
        if(!self::$fixtureFactory) {
            self::$fixtureFactory = new FixtureFactory();
        }
        return self::$fixtureFactory;
    }
}